﻿using AutoMapper;

namespace IdentityManagement
{
    public class IdentityManagementApplicationModuleAutoMapperProfile : Profile
    {
        public IdentityManagementApplicationModuleAutoMapperProfile()
        {
            CreateMap<IdentityUser, IdentityUserResult>()
                .MapExtraProperties();
            CreateMap<IdentityUserCreateParameter, IdentityUser>();
            CreateMap<IdentityUserUpdateParameter, IdentityUser>();

            CreateMap<IdentityRole, IdentityRoleResult>()
                .MapExtraProperties();
            CreateMap<IdentityRoleCreateParameter, IdentityRole>();
            CreateMap<IdentityRoleUpdateParameter, IdentityRole>();

            CreateMap<OrganizationUnit, OrganizationUnitResult>()
                .MapExtraProperties();
            CreateMap<OrganizationUnit, OrganizationUnitTreeResult>()
                .MapExtraProperties();
            CreateMap<OrganizationUnitCreateParameter, OrganizationUnit>();
            CreateMap<OrganizationUnitUpdateParameter, OrganizationUnit>();
        }
    }
}
